<?php
/**
 * @ClassName: IncomeTypeEnum
 * @Description: 收益类型枚举
 * @author: gydtrade
 * @Date: 2025-10-23 14:18
 * @Version: V1.0.0
 */

namespace app\common\enum;

class IncomeTypeEnum
{
    const income_type_merchant = 'merchantAward';
    const income_type_leader = 'leaderAward';
    const income_type_cultivate = 'cultivateAward';
    const income_type_direct = 'directAward';
    const income_type_indir = 'indirAward';
    const income_type_open = 'openAward';
    const income_type_company = 'companyIncome';
    const income_type_other = 'otherRebate';
    const income_type_ad = 'adIncome';
    const income_type_task = 'taskIncome';
    const income_type_province_center = 'provinceCenterIncome';
    const income_type_city_center = 'cityCenterIncome';
    const income_type_area_center = 'areaCenterIncome';

    public static function allText($status)
    {
        $desc = [
            IncomeTypeEnum::income_type_merchant => '招商奖',
            IncomeTypeEnum::income_type_leader => '领导奖',
            IncomeTypeEnum::income_type_cultivate => '培养奖',
            IncomeTypeEnum::income_type_direct => '直推奖',
            IncomeTypeEnum::income_type_indir => '间推奖',
            IncomeTypeEnum::income_type_open => '开户奖',
            IncomeTypeEnum::income_type_company => '平台收益',
            IncomeTypeEnum::income_type_other => '其他分成',
            IncomeTypeEnum::income_type_ad => '广告收益',
            IncomeTypeEnum::income_type_task => '任务收益',
            IncomeTypeEnum::income_type_province_center => '省运营中心收益',
            IncomeTypeEnum::income_type_city_center => '城市运营中心收益',
            IncomeTypeEnum::income_type_area_center => '区县运营中心收益',
        ];
        if ($status === true) {
            return $desc;
        }
        return $desc[$status] ?? $status;
    }

    public static function ahentText($status)
    {
        $desc = [
            IncomeTypeEnum::income_type_merchant => '招商奖',
            IncomeTypeEnum::income_type_leader => '领导奖',
            IncomeTypeEnum::income_type_cultivate => '培养奖',
            IncomeTypeEnum::income_type_direct => '直推奖',
            IncomeTypeEnum::income_type_indir => '间推奖',
            IncomeTypeEnum::income_type_open => '开户奖',
            IncomeTypeEnum::income_type_ad => '广告收益',
            IncomeTypeEnum::income_type_task => '任务收益',
            IncomeTypeEnum::income_type_province_center => '省运营中心收益',
            IncomeTypeEnum::income_type_city_center => '城市运营中心收益',
            IncomeTypeEnum::income_type_area_center => '区县运营中心收益',
        ];
        if ($status === true) {
            return $desc;
        }
        return $desc[$status] ?? $status;
    }

}